proxies help hibernate implement other features, like lazy loading 代理幫助hibernate實現(xiàn)一些其他的特性,比如懶散加載(lazyloading)。
for example, kodo jdo has far better error messages and more predictable behavior around some of the edge cases, like managing lazy loading 例如,對于一些邊緣情況,比如管理懶散加載,kodojdo有非常好的錯誤信息和更加可預(yù)測的行為。
what we will try to accomplish here is to create unique interface for traversing arrays and to add a little more control over how our objects are created and finally, to support lazy loading 我們要在這里試著完成的是為遍歷數(shù)組和在如何創(chuàng)建對象上加入一點(diǎn)額外的控制去創(chuàng)建一個唯一的接口,最后去支持傻瓜式的讀取。
with the lazy load improvements, data for each page is read when the page is accessed, avoiding performance degradation, and greatly increasing the number of pages that a single portal can host 借助延遲加載改進(jìn)功能,每個頁面的數(shù)據(jù)均在訪問該頁面時加載,從而避免了性能下降,并大幅度增加了單個門戶中可以駐留的頁面的數(shù)量。